package day07_collections_map.com.itheima.d5_map_travesal;

import java.util.HashMap;

public class MapDemo3 {
    public static void main(String[] args) {
        HashMap<String, Integer> map = new HashMap<>();
        map.put("张三", 100);
        map.put("张三1", 99);
        map.put("张三2", 98);
        map.put("张三3", 97);

        System.out.println("map = " + map);
        map.forEach((k, v) -> System.out.println(k + "=" + v));

        map.forEach((k, v) -> System.out.println(v + "=" + k));

    }

}
